import { Attachment } from "@/types/content/attachment";
import { get, post, remove } from "@/utils/request";


/**
 * 查询相册
 * @param data
 * @returns
 */
export const queryPhotoList = (data: Attachment.Query) =>post<PageVo<Attachment.Row>>( `/attachment/list`, data);
export const removePhoto = (id:string)=>remove(`/attachment/${id}`)
export const queryTagList = (type: string) =>get<string[]>(`/attachment/tag?type=${type || ''}`);
/**
 * 保存
 * @param data 
 * @returns 
 */
export const savePhoto = (data: Attachment.Form)=>post(`/attachment/save`,data);